home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 22 code / Futures / AEThreads / AEThreads.h < prev   
Encoding:
Text File  |  1995-04-15  |  950 b   |  43 lines  |  [TEXT/MMCC]

  1. //    AEThreads.h
  2. //
  3. //    Copyright © 1993-95 Steve Sisak
  4. //    
  5. //    License is granted to use, modify, make derivative works, and 
  6. //    duplicate this code at will, so long as this notice remains intact.
  7. //
  8.  
  9. #ifndef __AETHREADS__
  10. #define __AETHREADS__
  11. #pragma once
  12.  
  13. #ifndef __APPLEEVENTS__
  14. #include <AppleEvents.h>
  15. #endif
  16. #ifndef __THREADS__
  17. #include <Threads.h>
  18. #endif
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24. // Call this routine where you would have called AEInstallEventHandler()
  25. // to have your handler function automatically called from a new thread
  26. // for each incoming event.  The parameter descriptions are the same as
  27. // those for AEInstallEventHandler() and NewThread()
  28.  
  29. pascal OSErr AEInstallThreadedEventHandler(
  30.                     AEEventClass        theAEEventClass,
  31.                     AEEventID            theAEEventID,
  32.                     AEEventHandlerUPP    proc,
  33.                     long                handlerRefcon,
  34.                     ThreadOptions        options,
  35.                     Size                stacksize);    
  36.  
  37.  
  38.  
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42.  
  43. #endif // __AETHREADS__